{"cells": [{"cell_type": "markdown", "metadata": {"tags": ["module-htg", "module-vip"]}, "source": ["# Distribution coefficients\n", "[High-Temperature Geochemistry](module-htg) [Volcanism and Internal Processes](module-vip) \n", "```{index} Distribution coefficient\n", "```\n", "The distribution of a trace element, for example between a solid mineral phase and a liquid magma phase, can be quantified using a distribution (partition) coefficient ($K_D$):\n", "\n", "$$K_{D} = \\frac{C_{solid}}{C_{liquid}}$$\n", "\n", "where $C_i$ is the concentration of a particular element.\n", "\n", " * Elements with $K_D>1$ are **compatible** in a certain solid phase (they prefer to be in the solid/mineral, i.e. will be depleted in the liquid/melt).\n", " * Elements with $K_D<1$ are **incompatible** in a certain solid phase (they prefer to be in the liquid/melt).\n", " * Elements with $K_D<<1$ ($K_D < 0.01$ or so) are termed **highly incompatible** in a certain solid phase.\n", " \n", "The compability of an element depends on the charge and/or size of its ion - compatible ions tend to have a size fitting well in the crystal structure of a mineral. Elements show different compatibilities in different mineral phases.\n", "\n", "$K_D$ values are most readily determined by trace element analyses of silicate liquids that are in equilibrium with individual mineral phases (phenocrysts, e.g., ol, plag, cpx, etc).\n", "\n", " * Need to make sure that equilibrium assemblages are used!\n", " * Suitable equilibrium systems can be either natural samples (basaltic rock w/ phenocysts) or they are produced in laboratory experiments (experimental petrology)\n", " * The analyses commonly utilize in-situ analytical techniques (electron or ion microprobe, LA-ICPMS).\n", "\n", "Rocks typically consist of more than one mineral phase. Hence, during partial melting of such a rock, several phases participate in the melting reactions. The degree to which an element is distributed between the liquid and the solid phases depends on the sum of the individual partition coefficients, weighed according to the relative proportions of the mineral phases present in the solid. The bulk distribution coefficient $D$ of a specific element is therefore defined as:\n", "\n", "$$D_{s/l} = \\sum_i f_i K_{D,i}$$\n", "\n", "where $f$ is the mass fraction of a specific mineral i in a rock."]}, {"cell_type": "code", "execution_count": 8, "metadata": {"tags": ["hide-input"]}, "outputs": [], "source": ["# import relevant modules\n", "\n", "%matplotlib inline\n", "import numpy as np\n", "import pandas as pd\n", "from IPython.display import display\n", "from math import log10, floor"]}, {"cell_type": "code", "execution_count": 16, "metadata": {"tags": ["hide-input"]}, "outputs": [], "source": ["# create our own functions\n", "\n", "# function to round a value to a certain number of significant figures\n", "def round_to_n_sf(value, no_of_significant_figures):\n", " value_rounded = round(value, no_of_significant_figures-1-int(floor(log10(abs(value)))))\n", " if value_rounded == int(value_rounded): \n", " value_rounded = int(value_rounded)\n", " return value_rounded"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## Problem Set 1 - Question 2\n", "\n", "Based on the $K_D$ values given in the handout, calculate the bulk rock/melt distribution coefficients $D$ of $Rb$ and $Sm$ for a spinel and garnet peridotite with the following mineral modes:"]}, {"cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [{"name": "stdout", "output_type": "stream", "text": ["Table 1: The proportions of minerals in spinel peridotite and garnet peridotite.\n"]}, {"data": {"text/html": ["\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Spinel Peridotite (%) Garnet Peridotite (%)
Olivine6663
Orthopyroxene2430
Clinopyroxene82
Spinel20
Garnet05
"], "text/plain": [""]}, "metadata": {}, "output_type": "display_data"}, {"name": "stdout", "output_type": "stream", "text": ["Table 2: The distribution coefficients of some elements in some minerals.\n"]}, {"data": {"text/html": ["\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Rb U Pb Sr Nd Sm Cr Ni
Olivine4.0e-052.0e-058.0e-036.0e-051.0e-044.0e-046.0e-018.0e+00
Orthopyroxene5.0e-031.0e-031.0e-025.0e-031.0e-022.0e-022.0e+004.0e+00
Clinopyroxene3.0e-031.0e-021.0e-021.6e-012.8e-014.6e-014.0e+003.0e+00
Spinel5.0e-041.0e-03nan5.0e-046.0e-045.0e-042.0e+021.0e+01
Garnet7.0e-036.0e-031.0e-041.0e-023.6e-011.1e+005.0e-014.0e-01
"], "text/plain": [""]}, "metadata": {}, "output_type": "display_data"}], "source": ["# create a dataframe to show the proportions of minerals in each rock\n", "minerals = [\"Olivine\", \"Orthopyroxene\", \"Clinopyroxene\", \"Spinel\", \"Garnet\"]\n", "percents_in_spinel_peridotite = [66, 24, 8, 2, 0]\n", "percents_in_garnet_peridotite = [63, 30, 2, 0, 5]\n", "\n", "dict1 = {'' : minerals,\n", " 'Spinel Peridotite (%)' : percents_in_spinel_peridotite,\n", " 'Garnet Peridotite (%)' : percents_in_garnet_peridotite}\n", "df1 = pd.DataFrame(dict1)\n", "print(\"Table 1: The proportions of minerals in spinel peridotite and garnet peridotite.\")\n", "display(df1.style.hide_index())\n", "\n", "# create a dataframe to show the distribution coefficients of some elements in some minerals acquired from the handout\n", "minerals = [\"Olivine\", \"Orthopyroxene\", \"Clinopyroxene\", \"Spinel\", \"Garnet\"]\n", "KD_Rb = [4*10**-5, 0.005, 0.003, 5*10**-4, 0.007]\n", "KD_U = [2*10**-5, 0.001, 0.01, 0.001, 0.006]\n", "KD_Pb = [0.008, 0.01, 0.01, None, 1*10**-4]\n", "KD_Sr = [6*10**-5, 0.005, 0.16, 5*10**-4, 0.01]\n", "KD_Nd = [1*10**-4, 0.01, 0.28, 6*10**-4, 0.36]\n", "KD_Sm = [4*10**-4, 0.02, 0.46, 5*10**-4, 1.1]\n", "KD_Cr = [0.6, 2, 4, 200, 0.5]\n", "KD_Ni = [8, 4, 3, 10, 0.4]\n", "\n", "dict2 = {'' : minerals,\n", " 'Rb' : KD_Rb,\n", " 'U' : KD_U,\n", " 'Pb' : KD_Pb,\n", " 'Sr' : KD_Sr,\n", " 'Nd' : KD_Nd,\n", " 'Sm' : KD_Sm,\n", " 'Cr' : KD_Cr,\n", " 'Ni' : KD_Ni}\n", "df2 = pd.DataFrame(dict2)\n", "elements = ['Rb', 'U', 'Pb', 'Sr', 'Nd', 'Sm', 'Cr', 'Ni']\n", "for e in elements:\n", " df2.loc[:, e] = df2[e].map('{:.1e}'.format)\n", "print(\"Table 2: The distribution coefficients of some elements in some minerals.\")\n", "display(df2.style.hide_index())"]}, {"cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [{"name": "stdout", "output_type": "stream", "text": ["The bulk distribution coefficient of Rb for a spinel peridotite is 0.0015, meaning that Rb is highly incompatible in spinel peridotite.\n", "The bulk distribution coefficient of Rb for a garnet peridotite is 0.0019, meaning that Rb is highly incompatible in garnet peridotite.\n", "The bulk distribution coefficient of Sm for a spinel peridotite is 0.042, meaning that Sm is incompatible in spinel peridotite.\n", "The bulk distribution coefficient of Sm for a garnet peridotite is 0.07, meaning that Sm is incompatible in garnet peridotite.\n"]}], "source": ["# Question 2\n", "# create a function to calculate the bulk distribution coefficient of an element in a rock\n", "# make sure the orders of values for each mineral are correct\n", "def bulk_distribution_coefficient_calculator(minerals_percentages_list, KD_list):\n", " minerals_percentages_array = np.array(minerals_percentages_list)\n", " KD_array = np.array(KD_list)\n", " D = np.sum(minerals_percentages_array/100*KD_array)\n", " if D >= 1: Compatibility = \"compatible\"\n", " else: \n", " if D < 0.01: Compatibility = \"highly incompatible\"\n", " else: Compatibility = \"incompatible\"\n", " return D, Compatibility\n", "\n", "\n", "D_Rb_in_spinel_peridotite = bulk_distribution_coefficient_calculator(percents_in_spinel_peridotite, KD_Rb)\n", "D_Rb_in_garnet_peridotite = bulk_distribution_coefficient_calculator(percents_in_garnet_peridotite, KD_Rb)\n", "D_Sm_in_spinel_peridotite = bulk_distribution_coefficient_calculator(percents_in_spinel_peridotite, KD_Sm)\n", "D_Sm_in_garnet_peridotite = bulk_distribution_coefficient_calculator(percents_in_garnet_peridotite, KD_Sm)\n", "print(\"The bulk distribution coefficient of Rb for a spinel peridotite is %g, meaning that Rb is %s in spinel peridotite.\" \\\n", " % (round_to_n_sf(D_Rb_in_spinel_peridotite[0], 2), D_Rb_in_spinel_peridotite[1]))\n", "print(\"The bulk distribution coefficient of Rb for a garnet peridotite is %g, meaning that Rb is %s in garnet peridotite.\" \\\n", " % (round_to_n_sf(D_Rb_in_garnet_peridotite[0], 2), D_Rb_in_garnet_peridotite[1]))\n", "print(\"The bulk distribution coefficient of Sm for a spinel peridotite is %g, meaning that Sm is %s in spinel peridotite.\" \\\n", " % (round_to_n_sf(D_Sm_in_spinel_peridotite[0], 2), D_Sm_in_spinel_peridotite[1]))\n", "print(\"The bulk distribution coefficient of Sm for a garnet peridotite is %g, meaning that Sm is %s in garnet peridotite.\" \\\n", " % (round_to_n_sf(D_Sm_in_garnet_peridotite[0], 2), D_Sm_in_garnet_peridotite[1]))"]}, {"cell_type": "markdown", "metadata": {}, "source": ["## References\n", "\n", "- Lecture slide and Practical for Lecture 1 of the High-Temperature Geochemistry module\n", "- Lecture slide for Lecture 4 of the Volcanism and Internal Processes module"]}], "metadata": {"celltoolbar": "Tags", "kernelspec": {"display_name": "Python 3", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8"}}, "nbformat": 4, "nbformat_minor": 4}